package cn.suxiaoxiang.mmskillbar.utils;

import cn.suxiaoxiang.mmskillbar.MMskillBar;
import org.bukkit.Bukkit;
import org.bukkit.boss.BarColor;
import org.bukkit.boss.BarStyle;

/**
 * @author Corder-Suxiaoxiang
 * @UserName 程序员_Suxiaoxiang
 * @date 2025/2/28 17:31
 * @Version 1.0
 */
public class getConfigBossBarStyle {

    public BarStyle getBossBarStyle() {
        String style = MMskillBar.main.getConfig().getString("bossbarStyle.style", "SOLID");
        try {
            return BarStyle.valueOf(style);
        } catch (Exception e) {
            Bukkit.getServer().getConsoleSender().sendMessage("§d[MMskillBar] §2配置文件错误！BossBarStyle类别设置错误！");
            return BarStyle.SOLID;
        }
    }
}
